home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIEditorStyleSheets.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  124 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Akkana Peck <akkana@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsISupports.idl"
  40.  
  41. %{C++
  42. class nsICSSStyleSheet;
  43. %}
  44.  
  45. [ptr] native nsICSSStyleSheet(nsICSSStyleSheet);
  46.  
  47. [scriptable, uuid(4805e682-49b9-11d3-9ce4-ed60bd6cb5bc)]
  48.  
  49. interface nsIEditorStyleSheets : nsISupports
  50. {
  51.   /** load and apply the style sheet, specified by aURL, to the
  52.     * editor's document, replacing the last style sheet added (if any).
  53.     * This can involve asynchronous network I/O.
  54.     * 
  55.     * @param aURL         The style sheet to be loaded and applied.
  56.     */
  57.   void replaceStyleSheet(in AString aURL);
  58.  
  59.   /** Add the given Style Sheet to the editor's document,
  60.     * on top of any that are already there.
  61.     * This is always synchronous.
  62.     *
  63.     * @param aURL  The style sheet to be  applied.
  64.     */
  65.   void addStyleSheet(in AString aURL);
  66.  
  67.   /** load and apply the style sheet, specified by aURL, to the
  68.     * editor's document, replacing the last style sheet added (if any).
  69.     * This is always synchronous.
  70.     * 
  71.     * @param aURL         The style sheet to be loaded and applied.
  72.     */
  73.   void replaceOverrideStyleSheet(in AString aURL);
  74.  
  75.   /** load and apply an Override style sheet, specified by aURL, to
  76.     * the editor's document, on top of any that are already there.
  77.     * IMPORTANT: This is assumed to be synchronous:
  78.     *            URL is a local file with no @import used
  79.     * This action is not undoable.
  80.     * It is not intended for use by "user", only editor developers
  81.     *   to change display behavior for editing (like showing special cursors)
  82.     *   that will not be affected by loading other "document" style sheets
  83.     *   loaded using addStyleSheet or replaceStyleSheet.
  84.     *
  85.     * @param aURL         The style sheet to be loaded and applied.
  86.     */
  87.   void addOverrideStyleSheet(in AString aURL);
  88.  
  89.   /** Remove the given Style Sheet from the editor's document
  90.     * This is always synchronous
  91.     *
  92.     * @param aURL  The style sheet to be removed
  93.     */
  94.   void removeStyleSheet(in AString aURL);
  95.  
  96.   /** Remove the given Override Style Sheet from the editor's document
  97.     * This is always synchronous
  98.     *
  99.     * @param aURL  The style sheet to be removed.
  100.     */
  101.   void removeOverrideStyleSheet(in AString aURL);
  102.  
  103.   /** Enable or disable the given Style Sheet from the editor's document
  104.     * This is always synchronous
  105.     *
  106.     * @param aURL  The style sheet to be removed
  107.     */
  108.   void enableStyleSheet(in AString aURL, in PRBool aEnable);
  109.  
  110.   /** Get the nsICSSStyleSheet associated with the given URL.
  111.     *
  112.     * @param aURL         The style sheet's URL
  113.     * @return             the style sheet
  114.     */
  115.   [noscript] nsICSSStyleSheet getStyleSheetForURL(in AString aURL);
  116.  
  117.   /** Get the URL associated with the given nsICSSStyleSheet.
  118.     *
  119.     * @param aStyleSheet  The style sheet
  120.     * @return             the style sheet's URL
  121.     */
  122.   [noscript] AString getURLForStyleSheet(in nsICSSStyleSheet aStyleSheet);
  123. };
  124.